{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import os\n",
    "from market_profile import MarketProfile\n",
    "from google_finance import *"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Load google finance data from filesystem, or download and save locally"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "if not os.path.exists('google.txt'):\n",
    "    get_google_data('google.txt', 'GOOG', 60 * 30, 5)\n",
    "    \n",
    "df = read_google_data('google.txt')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Create the MarketProfile based on the dataframe of Google Finance data (OHLCV)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "mp = MarketProfile(df, tick_size=1)\n",
    "mp_slice = mp[df.index.max() - pd.Timedelta(6.5, 'h'):df.index.max()]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Show a nice plot of the calculated profile"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x10e0aec90>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEjCAYAAADOsV1PAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucX3V95/HX20QoapEgQ0SSGNDQNlAbYYrZhzcUCwF3\nDXYRoV2JlhIt0K0tbQ1tH8UbXWyLtuxDsFBSQrcQqDeyNYoppdVuDTBAzIWLDAFMsgFiguBWixDf\n+8f5jp4MczmZ+V0yM+/n43Eec36fc/mc8/v98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Avavr5cEf12qmefvB8Q1fmRi1q4jREtl+apiLH5J2D/+tPm\nJL2G6o6tA75OaWKSdBTVIzgfKLcG32z7cqrnnLwGuBU4XdKhZf6DJb2yI3sSsRdSNCLGwNWtFN4J\nvK10ud0E/A/gsdpsVwAvKHd2vRF4r+1ngDOAjZLWUZ0buc72vcAfAV+VtB5YAxzWuT2KaCa3EYmI\niMZypBHI/8B4AAAAMklEQVQREY2laERERGMpGhER0ViKRkRENJaiERERjaVoREREYykaERHRWIpG\nREQ09v8BmFSG6eMZSvYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10e0ae6d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data = mp_slice.profile\n",
    "data.plot(kind='bar')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Show some of the indicators that were calculated from the profile above"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Initial balance: 963.360000, 972.540000\n",
      "Opening range: 964.000000, 966.740000\n",
      "POC: 978.900000\n",
      "Profile range: 964.800000, 978.900000\n",
      "Value area: 972.750000, 978.900000\n",
      "Balanced Target: 993.000000\n"
     ]
    }
   ],
   "source": [
    "print \"Initial balance: %f, %f\" % mp_slice.initial_balance()\n",
    "print \"Opening range: %f, %f\" % mp_slice.open_range()\n",
    "print \"POC: %f\" % mp_slice.poc_price\n",
    "print \"Profile range: %f, %f\" % mp_slice.profile_range\n",
    "print \"Value area: %f, %f\" % mp_slice.value_area\n",
    "print \"Balanced Target: %f\" % mp_slice.balanced_target"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
